package com.js.rest.sys;

import com.js.domian.model.AjaxResult;
import com.js.service.sys.DictService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/dict")
@RestController
@RequiredArgsConstructor
public class DictRest {

    private final DictService dictService;

    @GetMapping("/getDictByType")
    public AjaxResult getDictByType(@RequestParam("type") String type) {
        return AjaxResult.ok(dictService.getDictByType(type));
    }
}
